package com.hc.dfs.service.common;

import com.hc.dfs.activity.R;

/**
 * <p>
 *  各种参数
 * </p>
 * @author 李小龙
 * @date 2012-11-27 上午11:11:49
 * @vesion $Revision: 1794 $ $Date: 2013-02-19 16:16:32 +0800 (周二, 19 二月 2013) $
 */
public class ParamsTable {

	public static String getBooleanSwitch(int i){
		if(i==0){
			return "否";
		}else if(i==1){
			return "是";
		}
		return "";
	}
	
	/**
	 * 根据公文类型id查询公文类型
	 * @param i
	 * @return
	 */
	public static String getDocType(int i){
		switch (i) {
		case 4:
			return "呈批单";
		case 5:
			return "发文稿纸";
		case 6:
			return "合同";
		default:
			return "";
		}
	}
	
	/**
	 * 秘密等级
	 * @param id
	 */
	public static String getConfidenceLevel(int id){
		switch (id) {
		case 1:
			return "普通";
		case 2:
			return "秘密";
		case 3:
			return "机密";
		case 4:
			return "绝密";
		default:
			return "";
		}
	}

	/**
	 * 紧急程度
	 * @param id
	 */
	public static String getPriorityLevel(int id){
		switch (id) {
		case 3:
			return "平件";
		case 2:
			return "急件";
		case 1:
			return "特急件";
		default:
			return "";
		}
	}

	/**
	 * 文档状态
	 * @param id
	 * @return 0:正常;1:正常结束;2:非正常结束;3:草稿;
	 */
	public static String getDocStatus(int id){
		switch (id) {
		case 0:
			return "起始";
		case 1:
			return "未流转";
		case 2:
			return "待签";
		case 3:
			return "流转";
		case 6:
			return "过期";
		case 7:
			return "等待会签";
		case 8:
			return "会签结束";
		default:
			return "";
		}
	}

	/**
	 * 用户状态  hc_users status (0:删除,1:正常,2：冻结)
	 * @param type 类别
	 * @return 0:删除,1:正常,2：冻结
	 */
	public static String getUserStatus(int status){
		switch (status) {
		case 0:
			return "正常";
		case 1:
			return "删除";
		case 2:
			return "离职";
		default:
			return "缺省";
		}
	}

	/**
	 * 用户状态  hc_users status (0:删除,1:正常,2：冻结)
	 * @param type 类别
	 * @return 0:删除,1:正常,2：冻结
	 */
	public static String getNoticeLight(int status){
		switch (status) {
		case 0:
			return "正常";
		case 1:
			return "高亮";
		default:
			return "缺省";
		}
	}

	/**
	 * 节点状态 0:起始:1未流转;2:待签;3:流转;4:已撤销;5:已删除,6过期
	 * @param status
	 * @return
	 */
	public static String getNodeStatus(int status){
		switch (status) {
		case 0:
			return "起始";
		case 1:
			return "未流转";
		case 2:
			return "待签";
		case 3:
			return "流转";
		case 4:
			return "已撤销";
		case 5:
			return "已删除";
		case 6:
			return "过期";
		case 7:
			return "等待会签";
		case 8:
			return "会签结束";
		default:
			return "";
		}
	}

	/**
	 * 操作状态 0:呈报,1:发送会签,2:中转,3:签批,4:结束
	 * @param type
	 * @return
	 */
	public static String getOperType(int type){
		switch (type) {
		case 0:
			return "呈报";
		case 1:
			return "发送会签";
		case 2:
			return "中转";
		case 3:
			return "签批";
		case 4:
			return "结束";
		default:
			return "";
		}
	}
	
	
	/**
	 * 短信群发表类型 hc_mass_sms type (1:即时发送短信,2:定时发送短信)
	 * @param type 类别
	 * @return 1:即时发送短信,2:定时发送短信
	 */
	public static String getMassSMSType(int type){
		switch (type) {
		case 1:
			return "即时发送";
		case 2:
			return "定时发送";
		default:
			return "未知";
		}
	}

	/**
	 * 短信群发表状态 hc_mass_sms status (0:待发送,1:已发送,2:发送失败,3:已删除)
	 * @param status 状态
	 * @return 0:待发送,1:已发送,2:发送失败,3:已删除
	 */
	public static String getMassSMSStatus(int status){
		switch (status) {
		case 0:
			return "待发送";
		case 1:
			return "已发送";
		case 2:
			return "发送失败";
		case 3:
			return "已删除";
		default:
			return "未知";
		}
	}

	/**
	 * 根据缓急标志获取公文缓急图标
	 * @param priorityLevel
	 * @return
	 */
	public static int convertPriorityLevel(int priorityLevel) {
		int r = 0;
		switch (priorityLevel) {
		case 1:
			r = R.drawable.huanji_teji;
		case 2:
			r = R.drawable.huanji_jijian;
			break;
		case 3:
			r = R.drawable.huanji_pingjian;
			break;
		default:
			break;
		}
		System.out.println("缓急标志："+priorityLevel);
		return r;
	}

	/**
	 * 根据标志获取公文密级图标
	 * @param confidenceLevel
	 * @return
	 */
	public static int convertConfidenceLevel(int confidenceLevel) {
		int r = 0;
		switch (confidenceLevel) {
		case 1:
			r = R.drawable.miji_putong;
			break;
		case 2:
			r = R.drawable.miji_mimi;
			break;
		case 3:
			r = R.drawable.miji_jimi;
			break;
		case 4:
			r = R.drawable.miji_juemi;
			break;
		default:
			break;
		}
		System.out.println("密级标志："+confidenceLevel);
		return r;
	}
}
